package com.copa.gamestore.module.user.service.impl;

import com.copa.gamestore.module.user.domain.UserRole;
import com.copa.gamestore.module.user.mapper.UserRoleMapper;
import com.copa.gamestore.module.user.service.UserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author copa
 * @createDate 2022-09-23 10:42
 * @function
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Resource
    private UserRoleMapper userRoleMapper;

    @Override
    public void add(UserRole userRole) {
        if (userRoleMapper.insert(userRole) <= 0) {
            throw new RuntimeException();
        }
    }
}
